package com.yvchen.yc_system.module.qrcode.controller;

import cn.hutool.extra.qrcode.QrConfig;
import com.yvchen.yc_system.module.qrcode.service.QRService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;

@RestController
@RequestMapping("qr")
public class QRController {
    @Autowired
    QRService qrService;
    @RequestMapping("/start")
    public void generateV3(HttpServletResponse servletResponse) throws IOException {
        String content = "ceshi";
//        qrService.generateFile(content,new File("D:\\1"));
        ArrayList<Object> objects = new ArrayList<>();
        qrService.generateStream(content,servletResponse);
    }
}
